using System;
using System.Linq;
using System.Linq.Expressions;

namespace WebPic.Sample.Comum {
    public interface IRepository<T> where T : class {
        void Add(T entity);

        void Update(T entity);

        void Remove(T entity);

        IQueryable<T> Get(Expression<Func<T, bool>> predicate = null);

        IQueryable<T> Get(ISpecification<T> criteria);

        T Find(ISpecification<T> criteria);

        T Find(params object[] keysValues);
    }
}